﻿using System;

namespace awsomeSyntezator.PipeLine.Oscilators
{
	class WhiteNoise : Oscilator
	{
		private Random whiteNoiseRandomizer;
        public WhiteNoise(float _freq) : base(_freq, 0, 1)
        {
			whiteNoiseRandomizer = new Random((int)DateTime.Now.Ticks);
            type = 0;
        }
        public WhiteNoise(float _freq, int strenght): base(_freq, 0, strenght)
        {
			whiteNoiseRandomizer = new Random((int)DateTime.Now.Ticks);
            type = 0;
        }
        public override double getSample(int n, double sample)
        {
			return (whiteNoiseRandomizer.NextDouble()-0.5)*2.0;
		}
	}
}
